import http from '@/utils/http'
export const getRoleListApi = async () => {
    const url = '/api/rolelist'
    return http.get(url)
}

export const addRoleApi = async (data) => {
    const url = '/api/roleadd'
    return http.post(url, data)
}

export const delRoleApi = async (data) => {
    const url = '/api/roledelete'
    return http.post(url, { id : data })
}

export const setRoleApi = async (data) => {
    const url = '/api/roleedit'
    return http.post(url, data)
}

export const getRoleApi = async (data) => {
    const url = '/api/roleinfo'
    return http.get(url,{params:{id: data}})
}
